<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>后台管理系统登录</title>
</head>
<body>

    <div id="app">




              <input  type="text"   v-model="username" placeholder="用户名" />
              <br>
              <input  type="password" v-model="password" placeholder="密码" />
              <br>
        <!--      <input  type="submit"    placeholder="登录" />-->
              <button type="submit" @click="login">登录</button>

  </div>

  <script src="./js/axios.min.js"></script>
  <script type="module">
      import { createApp } from './js/vue.esm-browser.js'
      createApp({
          data(){
             return{
                 username:'',
                 password:''
              }
          },
          methods:{

              async getHeroList(){
                  const result =  await axios.get('/login?username=daqiao&password=123456');
                  console.log("result--------++++++++++++》》》》》",result)
                  // this.userList = result.data;
                  // console.log("result-----------》》》》》", this.userList);
              },
              async login(){
                  console.log("username",this.username)
                  console.log("password",this.password)
                  const result =  await axios.post('/login',{
                      username: this.username,
                      password: this.password
                  });

                  console.log("result----------------》》》》》》",result)





              }
          },
          mounted(){

              // this.getListArray();
              // this.getHeroList();

          }
      }).mount("#app")


  </script>

</body>
</html>